-- GENERATED SPELL FOR [Coilfang Engineer] --


function spell0_17721(pUnit, Event) --@Bomb,n/a--
pUnit:FullCastSpellOnTarget(40331,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17721', 1500, 1)
end

function spell1_17721(pUnit, Event) --@Bomb,n/a--
pUnit:FullCastSpellOnTarget(40332,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17721', 1500, 1)
end

function spell2_17721(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17721', 2348, 1)
end

function Sorts_17721(pUnit, Event)
local choix_sorts_17721 = math.random(0, 2)
if choix_sorts_17721 == 0 then
pUnit:RegisterEvent('spell0_17721', 1, 1)
end
if choix_sorts_17721 == 1 then
pUnit:RegisterEvent('spell1_17721', 1, 1)
end
if choix_sorts_17721 == 2 then
pUnit:RegisterEvent('spell2_17721', 1, 1)
end
end

function mob17721_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17721', math.random(1500, 3000), 1)
end

function mob17721_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17721_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17721_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17721, 1, 'mob17721_Action')
RegisterUnitEvent(17721, 2, 'mob17721_Leave')
RegisterUnitEvent(17721, 3, 'mob17721_Kill')
RegisterUnitEvent(17721, 4, 'mob17721_Die')
